package com.qkjia.day01;

public class Test06_Daemon {

	public static void main(String[] args) {
		Thread thread = new Thread(new DaemonRunner());
		thread.setDaemon(true);
		thread.start();

		SleepUtils.second(3);
		System.out.println("easybuy");
	}

	static class DaemonRunner implements Runnable {
		@Override
		public void run() {
			try {
				System.out.println("守护进程开始睡觉");
				SleepUtils.second(100);
			} finally {
				System.out.println("DaemonThread finally run.");
			}
		}
	}
}